package com.itheima.demo.demo10;

import java.io.*;

public class Print {
    public static void main(String[] args) throws IOException {
        /*PrintStream ps=new PrintStream("D://123.txt");
        System.setOut(ps);
        System.out.println("一条大河");*/
      /*  BufferedOutputStream bufo = new BufferedOutputStream(new FileOutputStream("D://123.txt"));
        bufo.write("hello 黑马程序员".getBytes());*/

        BufferedWriter bufo = new BufferedWriter(new FileWriter("D://123.txt"));
        bufo.write("hello 黑马程序员");
        bufo.close();


    }
}
